package mc.support.taobao.api;

import com.taobao.api.TaobaoRequest;
import com.taobao.api.request.ClouddataMbpStatusGetRequest;
import com.taobao.api.response.ClouddataMbpStatusGetResponse;

import java.util.HashMap;
import java.util.Map;

/**
 * Created with IntelliJ IDEA. <br/>
 * Author: francis Yun    <br/>
 * Date: 2013-11-26  <br/>
 */
public class GetCloudDataStatusReq extends
        AbstractReq<GetCloudDataStatusReq, ClouddataMbpStatusGetResponse> {


    private Map<String, String> parameters;


    public GetCloudDataStatusReq addParameter(String column, String value) {
        if (null == parameters) {
            parameters = new HashMap<>();
        }
        parameters.put(column, value);
        return this;
    }

    @Override
    protected TaobaoRequest toRequest() {
        ClouddataMbpStatusGetRequest req = new ClouddataMbpStatusGetRequest();

        if (null != parameters) {
            req.setParameter(connectMap(parameters, "=", ","));
        }

        return req;
    }

}
